<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.17"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>QuEST: QuEST_cpu_internal.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand"><img alt="Logo" src="logo.png"/></a>
                    <a class="navbar-brand"><b>QuEST</b> v3.2.0<br>The Quantum Exact Simulation Toolkit</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d522931ffa1371640980b621734a4381.html">Users</a></li><li class="navelem"><a class="el" href="dir_70834f0dcd10de01d2e35ab402a2238e.html">tysonjones</a></li><li class="navelem"><a class="el" href="dir_1957401ef452be7528010ba0f4832a45.html">Desktop</a></li><li class="navelem"><a class="el" href="dir_dee4414d5d72b49a9429e079789ffd08.html">GithubRepos</a></li><li class="navelem"><a class="el" href="dir_a89b43d59316bb5045aa22bb53a67d29.html">QuEST</a></li><li class="navelem"><a class="el" href="dir_f1fe56bf5ef15ff22696c757278c6962.html">QuEST</a></li><li class="navelem"><a class="el" href="dir_757750313c878cfe3b7d1ade55b4b819.html">src</a></li><li class="navelem"><a class="el" href="dir_b42f528141150d9931abf34c4623dde5.html">CPU</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">QuEST_cpu_internal.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="QuEST__cpu__internal_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// Distributed under MIT licence. See https://github.com/QuEST-Kit/QuEST/blob/master/LICENCE.txt for details </span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor"># ifndef QUEST_CPU_INTERNAL_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor"># define QUEST_CPU_INTERNAL_H</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor"># include &quot;<a class="code" href="QuEST__precision_8h.html">QuEST_precision.h</a>&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">* Bit twiddling functions are defined seperately here in the CPU backend, </span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">* since the GPU backend  needs a device-specific redefinition to be callable </span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">* from GPU kernels. These are called in both QuEST_cpu and QuEST_cpu_distributed </span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">* and defined in here since public inline methods in C must go in the header</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="QuEST__cpu__internal_8h.html#a100463f6ec212c76a5fad99579000505">   26</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="QuEST__cpu__internal_8h.html#a100463f6ec212c76a5fad99579000505">extractBit</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> locationOfBitFromRight, <span class="keyword">const</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> theEncodedNumber) {</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keywordflow">return</span> (theEncodedNumber &amp; ( 1LL &lt;&lt; locationOfBitFromRight )) &gt;&gt; locationOfBitFromRight;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;}</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="QuEST__cpu__internal_8h.html#a234f55b49a14dc4c58b1959effeb1b56">   30</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="QuEST__cpu__internal_8h.html#a234f55b49a14dc4c58b1959effeb1b56">flipBit</a>(<span class="keyword">const</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> number, <span class="keyword">const</span> <span class="keywordtype">int</span> bitInd) {</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keywordflow">return</span> (number ^ (1LL &lt;&lt; bitInd));</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;}</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="QuEST__cpu__internal_8h.html#ae94d012c3da6c84599e99f6afea81f5f">   34</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="QuEST__cpu__internal_8h.html#ae94d012c3da6c84599e99f6afea81f5f">maskContainsBit</a>(<span class="keyword">const</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> mask, <span class="keyword">const</span> <span class="keywordtype">int</span> bitInd) {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordflow">return</span> mask &amp; (1LL &lt;&lt; bitInd);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;}</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="QuEST__cpu__internal_8h.html#a0e4eb651e7cb309bcd664b89ac9a2242">   38</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="QuEST__cpu__internal_8h.html#a0e4eb651e7cb309bcd664b89ac9a2242">isOddParity</a>(<span class="keyword">const</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> number, <span class="keyword">const</span> <span class="keywordtype">int</span> qb1, <span class="keyword">const</span> <span class="keywordtype">int</span> qb2) {</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="QuEST__cpu__internal_8h.html#a100463f6ec212c76a5fad99579000505">extractBit</a>(qb1, number) != <a class="code" href="QuEST__cpu__internal_8h.html#a100463f6ec212c76a5fad99579000505">extractBit</a>(qb2, number);</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;}</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="QuEST__cpu__internal_8h.html#aa183d46d750769c42ff07ae1aaedc105">   42</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="QuEST__cpu__internal_8h.html#aa183d46d750769c42ff07ae1aaedc105">insertZeroBit</a>(<span class="keyword">const</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> number, <span class="keyword">const</span> <span class="keywordtype">int</span> index) {</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> left, right;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    left = (number &gt;&gt; index) &lt;&lt; index;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    right = number - left;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordflow">return</span> (left &lt;&lt; 1) ^ right;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;}</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="QuEST__cpu__internal_8h.html#a8909226b5f0589d82b34af7f6bf2a339">   49</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="QuEST__cpu__internal_8h.html#a8909226b5f0589d82b34af7f6bf2a339">insertTwoZeroBits</a>(<span class="keyword">const</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> number, <span class="keyword">const</span> <span class="keywordtype">int</span> bit1, <span class="keyword">const</span> <span class="keywordtype">int</span> bit2) {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordtype">int</span> small = (bit1 &lt; bit2)? bit1 : bit2;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">int</span> big = (bit1 &lt; bit2)? bit2 : bit1;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="QuEST__cpu__internal_8h.html#aa183d46d750769c42ff07ae1aaedc105">insertZeroBit</a>(<a class="code" href="QuEST__cpu__internal_8h.html#aa183d46d750769c42ff07ae1aaedc105">insertZeroBit</a>(number, small), big);</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;}</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment"> * density matrix operations</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> <a class="code" href="QuEST__cpu__internal_8h.html#af910c7cf2b85bdc2c399cfe8dbfb8b9c">densmatr_calcPurityLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a1b36518c8fbbc3a5084bb4ad1fb05ea5">densmatr_initPureStateLocal</a>(<a class="code" href="structQureg.html">Qureg</a> targetQureg, <a class="code" href="structQureg.html">Qureg</a> copyQureg);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> <a class="code" href="QuEST__cpu__internal_8h.html#a7772f97cb4d92a9825bf3b7c82c3230c">densmatr_calcFidelityLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="structQureg.html">Qureg</a> pureState);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> <a class="code" href="QuEST__cpu__internal_8h.html#a939897137596bb73ad7a028d0beaaa10">densmatr_calcHilbertSchmidtDistanceSquaredLocal</a>(<a class="code" href="structQureg.html">Qureg</a> a, <a class="code" href="structQureg.html">Qureg</a> b);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> <a class="code" href="QuEST__cpu__internal_8h.html#a08392b1b27d10e3b8a8648a5afeaa629">densmatr_calcInnerProductLocal</a>(<a class="code" href="structQureg.html">Qureg</a> a, <a class="code" href="structQureg.html">Qureg</a> b);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> <a class="code" href="QuEST__cpu__internal_8h.html#a8bea931504c90d9bd97e74645667804e">densmatr_findProbabilityOfZeroLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> measureQubit);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ab750fb47da2fca9849c678c869e40e69">densmatr_mixDepolarisingLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> depolLevel);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a88670d0e7cebe33f61c1dd98daa338b3">densmatr_mixDepolarisingDistributed</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> depolLevel);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ab124a3a9956046bf9c0e1e3ae9171f42">densmatr_mixDampingLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> damping);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a8d9c19a3424f0ad89bfbfd920d65301d">densmatr_mixDampingDistributed</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> damping);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a3510f01d4d15dcc545564eb84c668cad">densmatr_mixTwoQubitDepolarisingLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> qubit1, <span class="keywordtype">int</span> qubit2, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> delta, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> gamma);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ae90f82418e0aa67218d733dbbc681998">densmatr_mixTwoQubitDepolarisingLocalPart1</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> qubit1, <span class="keywordtype">int</span> qubit2, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> delta);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a2f76ec8f08e19bb8e1254aafb10e160e">densmatr_mixTwoQubitDepolarisingDistributed</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit,</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                <span class="keywordtype">int</span> qubit2, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> delta, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> gamma);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#acabdfbd3184d3ab3bded61e24142b800">densmatr_mixTwoQubitDepolarisingQ1LocalQ2DistributedPart3</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit,</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                <span class="keywordtype">int</span> qubit2, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> delta, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> gamma);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#afa58cf7cb98a25ab33621120c5c330d0">densmatr_applyDiagonalOpLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="structDiagonalOp.html">DiagonalOp</a> op);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<a class="code" href="structComplex.html">Complex</a> <a class="code" href="QuEST__cpu__internal_8h.html#aeb4453a2e609e5359d2995bccf6663ca">densmatr_calcExpecDiagonalOpLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="structDiagonalOp.html">DiagonalOp</a> op);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="comment"> * state vector operations</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<a class="code" href="structComplex.html">Complex</a> <a class="code" href="QuEST__cpu__internal_8h.html#a6fbb3b693f25dde1e9e3dc87dc1984f7">statevec_calcInnerProductLocal</a>(<a class="code" href="structQureg.html">Qureg</a> bra, <a class="code" href="structQureg.html">Qureg</a> ket);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a5ddfdb22e4704b680d67d08d9e80835b">statevec_compactUnitaryLocal</a> (<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit, <a class="code" href="structComplex.html">Complex</a> alpha, <a class="code" href="structComplex.html">Complex</a> beta);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a0a7a35628b1c1eb47336deb9afda5b68">statevec_compactUnitaryDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg,</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <a class="code" href="structComplex.html">Complex</a> rot1, <a class="code" href="structComplex.html">Complex</a> rot2,</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        ComplexArray stateVecUp,</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        ComplexArray stateVecLo,</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        ComplexArray stateVecOut);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#aafc398f8f479fcc066a2dea700235635">statevec_unitaryLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit, <a class="code" href="structComplexMatrix2.html">ComplexMatrix2</a> u);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a0ce2c2fd54df25495e99dc5b95bed4b2">statevec_unitaryDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg,</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <a class="code" href="structComplex.html">Complex</a> rot1, <a class="code" href="structComplex.html">Complex</a> rot2,</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        ComplexArray stateVecUp,</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        ComplexArray stateVecLo,</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        ComplexArray stateVecOut);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a215e2d6f88dbecc0b408b3573b5e144f">statevec_controlledCompactUnitaryLocal</a> (<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> controlQubit, <span class="keywordtype">int</span> targetQubit,</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <a class="code" href="structComplex.html">Complex</a> alpha, <a class="code" href="structComplex.html">Complex</a> beta);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a071baf8b6951d2a7d6529394b6f39364">statevec_controlledCompactUnitaryDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> controlQubit,</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <a class="code" href="structComplex.html">Complex</a> rot1, <a class="code" href="structComplex.html">Complex</a> rot2,</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        ComplexArray stateVecUp,</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        ComplexArray stateVecLo,</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        ComplexArray stateVecOut);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a903beb4f5d8753a964ce2dc5f9096a24">statevec_controlledUnitaryLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> controlQubit, <span class="keywordtype">int</span> targetQubit, <a class="code" href="structComplexMatrix2.html">ComplexMatrix2</a> u);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a57368529b2a7e76fec423cbfe9980b22">statevec_controlledUnitaryDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> controlQubit,</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <a class="code" href="structComplex.html">Complex</a> rot1, <a class="code" href="structComplex.html">Complex</a> rot2,</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        ComplexArray stateVecUp,</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        ComplexArray stateVecLo,</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        ComplexArray stateVecOut);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ab19f28e68330da68ea3caa2bdef32da9">statevec_multiControlledUnitaryLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit,</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> ctrlQubitsMask, <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> ctrlFlipMask, <a class="code" href="structComplexMatrix2.html">ComplexMatrix2</a> u);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ab58fe4be895283c2c4eb86ec9af5682e">statevec_multiControlledUnitaryDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg,</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordtype">int</span> targetQubit,</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> ctrlQubitsMask, <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> ctrlFlipMask,</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <a class="code" href="structComplex.html">Complex</a> rot1, <a class="code" href="structComplex.html">Complex</a> rot2,</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        ComplexArray stateVecUp,</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        ComplexArray stateVecLo,</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        ComplexArray stateVecOut);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#aa987d1e0ba97da2ca540194356dd62de">statevec_pauliXLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a464efbd1d7ca5a7b25c83ada001955c2">statevec_pauliXDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg,</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        ComplexArray stateVecIn,</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        ComplexArray stateVecOut);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a45b0916c3e121837f214b64f7424e479">statevec_pauliYLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit, <span class="keywordtype">int</span> conjFac);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a0f562af6cb665a8a7a3f80e9449734d5">statevec_pauliYDistributed</a>(<a class="code" href="structQureg.html">Qureg</a> qureg,</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        ComplexArray stateVecIn,</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        ComplexArray stateVecOut,</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keywordtype">int</span> updateUpper, <span class="keywordtype">int</span> conjFac);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#abc6383ac53124601e58922205b3cc484">statevec_controlledPauliYLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> controlQubit, <span class="keywordtype">int</span> targetQubit, <span class="keywordtype">int</span> conjFactor);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160; </div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ae64f9630325b6f93c6e1e17b9918ecef">statevec_controlledPauliYDistributed</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> controlQubit,</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        ComplexArray stateVecIn,</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        ComplexArray stateVecOut, <span class="keywordtype">int</span> conjFactor);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a86dbcc3db99294add9964741e19fbdab">statevec_hadamardLocal</a> (<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> targetQubit);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160; </div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#abea6570b95fdfa102511ccd1fcb30685">statevec_hadamardDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg,</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        ComplexArray stateVecUp,</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        ComplexArray stateVecLo,</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        ComplexArray stateVecOut, <span class="keywordtype">int</span> updateUpper);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ace1482ef82b83e7f926634a67b322fc4">statevec_controlledNotLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> controlQubit, <span class="keywordtype">int</span> targetQubit);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a393da4c4bc582a757ca8406d8501aca0">statevec_controlledNotDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> controlQubit,</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        ComplexArray stateVecIn,</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        ComplexArray stateVecOut);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> <a class="code" href="QuEST__cpu__internal_8h.html#a8535bc15c2ff249ddddb3fde6eff1490">statevec_findProbabilityOfZeroLocal</a> (<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> measureQubit);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160; </div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> <a class="code" href="QuEST__cpu__internal_8h.html#a430d98e35f1eae7f0815ac539057cf67">statevec_findProbabilityOfZeroDistributed</a> (<a class="code" href="structQureg.html">Qureg</a> qureg);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ab02bce0ebbb8f624e8ced8b09b99cdef">statevec_collapseToKnownProbOutcomeLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> measureQubit, <span class="keywordtype">int</span> outcome, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> totalProbability);</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ad09bb76ad67581b03ab176832cca37cf">statevec_collapseToKnownProbOutcomeDistributedRenorm</a> (<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> measureQubit, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> totalProbability);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a7ea68e9132ed9db9c242353a33dba2f0">statevec_collapseToOutcomeDistributedSetZero</a>(<a class="code" href="structQureg.html">Qureg</a> qureg);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160; </div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#ab5b51a28caa8792a3f0c637409a694b0">statevec_swapQubitAmpsLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> qb1, <span class="keywordtype">int</span> qb2);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#abe74a5a9db8340e37b80fbc77338894d">statevec_swapQubitAmpsDistributed</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">int</span> pairRank, <span class="keywordtype">int</span> qb1, <span class="keywordtype">int</span> qb2);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#af8236a00389137b5eff986a40577eaf3">statevec_multiControlledTwoQubitUnitaryLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> ctrlMask, <span class="keywordtype">int</span> q1, <span class="keywordtype">int</span> q2, <a class="code" href="structComplexMatrix4.html">ComplexMatrix4</a> u);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="keywordtype">void</span> <a class="code" href="QuEST__cpu__internal_8h.html#a0aedcccfa50c7aaa8b7fc4c14d7cdfb8">statevec_multiControlledMultiQubitUnitaryLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> ctrlMask, <span class="keywordtype">int</span>* targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="structComplexMatrixN.html">ComplexMatrixN</a> u);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160; </div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;<a class="code" href="structComplex.html">Complex</a> <a class="code" href="QuEST__cpu__internal_8h.html#a16ccb485bcffb328bbd5b2af6977cead">statevec_calcExpecDiagonalOpLocal</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="structDiagonalOp.html">DiagonalOp</a> op);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160; </div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="preprocessor"># endif // QUEST_CPU_INTERNAL_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aQuEST__cpu__internal_8h_html_af910c7cf2b85bdc2c399cfe8dbfb8b9c"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#af910c7cf2b85bdc2c399cfe8dbfb8b9c">densmatr_calcPurityLocal</a></div><div class="ttdeci">qreal densmatr_calcPurityLocal(Qureg qureg)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00861">QuEST_cpu.c:861</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a939897137596bb73ad7a028d0beaaa10"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a939897137596bb73ad7a028d0beaaa10">densmatr_calcHilbertSchmidtDistanceSquaredLocal</a></div><div class="ttdeci">qreal densmatr_calcHilbertSchmidtDistanceSquaredLocal(Qureg a, Qureg b)</div><div class="ttdoc">computes Tr((a-b) conjTrans(a-b)) = sum of abs values of (a-b)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00923">QuEST_cpu.c:923</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ab02bce0ebbb8f624e8ced8b09b99cdef"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ab02bce0ebbb8f624e8ced8b09b99cdef">statevec_collapseToKnownProbOutcomeLocal</a></div><div class="ttdeci">void statevec_collapseToKnownProbOutcomeLocal(Qureg qureg, int measureQubit, int outcome, qreal totalProbability)</div><div class="ttdoc">Update the state vector to be consistent with measuring measureQubit=0 if outcome=0 and measureQubit=...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03380">QuEST_cpu.c:3380</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a2f76ec8f08e19bb8e1254aafb10e160e"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a2f76ec8f08e19bb8e1254aafb10e160e">densmatr_mixTwoQubitDepolarisingDistributed</a></div><div class="ttdeci">void densmatr_mixTwoQubitDepolarisingDistributed(Qureg qureg, int targetQubit, int qubit2, qreal delta, qreal gamma)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00541">QuEST_cpu.c:541</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_abe74a5a9db8340e37b80fbc77338894d"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#abe74a5a9db8340e37b80fbc77338894d">statevec_swapQubitAmpsDistributed</a></div><div class="ttdeci">void statevec_swapQubitAmpsDistributed(Qureg qureg, int pairRank, int qb1, int qb2)</div><div class="ttdoc">qureg.pairStateVec contains the entire set of amplitudes of the paired node which includes the set of...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03579">QuEST_cpu.c:3579</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a903beb4f5d8753a964ce2dc5f9096a24"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a903beb4f5d8753a964ce2dc5f9096a24">statevec_controlledUnitaryLocal</a></div><div class="ttdeci">void statevec_controlledUnitaryLocal(Qureg qureg, int controlQubit, int targetQubit, ComplexMatrix2 u)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02241">QuEST_cpu.c:2241</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ab750fb47da2fca9849c678c869e40e69"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ab750fb47da2fca9849c678c869e40e69">densmatr_mixDepolarisingLocal</a></div><div class="ttdeci">void densmatr_mixDepolarisingLocal(Qureg qureg, int targetQubit, qreal depolLevel)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00125">QuEST_cpu.c:125</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ae64f9630325b6f93c6e1e17b9918ecef"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ae64f9630325b6f93c6e1e17b9918ecef">statevec_controlledPauliYDistributed</a></div><div class="ttdeci">void statevec_controlledPauliYDistributed(Qureg qureg, int controlQubit, ComplexArray stateVecIn, ComplexArray stateVecOut, int conjFactor)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02830">QuEST_cpu.c:2830</a></div></div>
<div class="ttc" id="astructComplexMatrix4_html"><div class="ttname"><a href="structComplexMatrix4.html">ComplexMatrix4</a></div><div class="ttdoc">Represents a 4x4 matrix of complex numbers.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00125">QuEST.h:125</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a1b36518c8fbbc3a5084bb4ad1fb05ea5"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a1b36518c8fbbc3a5084bb4ad1fb05ea5">densmatr_initPureStateLocal</a></div><div class="ttdeci">void densmatr_initPureStateLocal(Qureg targetQureg, Qureg copyQureg)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01184">QuEST_cpu.c:1184</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a8d9c19a3424f0ad89bfbfd920d65301d"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a8d9c19a3424f0ad89bfbfd920d65301d">densmatr_mixDampingDistributed</a></div><div class="ttdeci">void densmatr_mixDampingDistributed(Qureg qureg, int targetQubit, qreal damping)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00300">QuEST_cpu.c:300</a></div></div>
<div class="ttc" id="astructComplexMatrixN_html"><div class="ttname"><a href="structComplexMatrixN.html">ComplexMatrixN</a></div><div class="ttdoc">Represents a general 2^N by 2^N matrix of complex numbers.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00136">QuEST.h:136</a></div></div>
<div class="ttc" id="agroup__type_html_ga7740e349b4f8bae6451547680f0ce2d6"><div class="ttname"><a href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a></div><div class="ttdeci">#define qreal</div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a0ce2c2fd54df25495e99dc5b95bed4b2"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a0ce2c2fd54df25495e99dc5b95bed4b2">statevec_unitaryDistributed</a></div><div class="ttdeci">void statevec_unitaryDistributed(Qureg qureg, Complex rot1, Complex rot2, ComplexArray stateVecUp, ComplexArray stateVecLo, ComplexArray stateVecOut)</div><div class="ttdoc">Apply a unitary operation to a single qubit given a subset of the state vector with upper and lower b...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02056">QuEST_cpu.c:2056</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a234f55b49a14dc4c58b1959effeb1b56"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a234f55b49a14dc4c58b1959effeb1b56">flipBit</a></div><div class="ttdeci">static long long int flipBit(const long long int number, const int bitInd)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu__internal_8h_source.html#l00030">QuEST_cpu_internal.h:30</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a393da4c4bc582a757ca8406d8501aca0"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a393da4c4bc582a757ca8406d8501aca0">statevec_controlledNotDistributed</a></div><div class="ttdeci">void statevec_controlledNotDistributed(Qureg qureg, int controlQubit, ComplexArray stateVecIn, ComplexArray stateVecOut)</div><div class="ttdoc">Rotate a single qubit by {{0,1},{1,0}.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02646">QuEST_cpu.c:2646</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_abc6383ac53124601e58922205b3cc484"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#abc6383ac53124601e58922205b3cc484">statevec_controlledPauliYLocal</a></div><div class="ttdeci">void statevec_controlledPauliYLocal(Qureg qureg, int controlQubit, int targetQubit, int conjFactor)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02776">QuEST_cpu.c:2776</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a0aedcccfa50c7aaa8b7fc4c14d7cdfb8"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a0aedcccfa50c7aaa8b7fc4c14d7cdfb8">statevec_multiControlledMultiQubitUnitaryLocal</a></div><div class="ttdeci">void statevec_multiControlledMultiQubitUnitaryLocal(Qureg qureg, long long int ctrlMask, int *targs, int numTargs, ComplexMatrixN u)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01846">QuEST_cpu.c:1846</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a100463f6ec212c76a5fad99579000505"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a100463f6ec212c76a5fad99579000505">extractBit</a></div><div class="ttdeci">static int extractBit(const int locationOfBitFromRight, const long long int theEncodedNumber)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu__internal_8h_source.html#l00026">QuEST_cpu_internal.h:26</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a6fbb3b693f25dde1e9e3dc87dc1984f7"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a6fbb3b693f25dde1e9e3dc87dc1984f7">statevec_calcInnerProductLocal</a></div><div class="ttdeci">Complex statevec_calcInnerProductLocal(Qureg bra, Qureg ket)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01071">QuEST_cpu.c:1071</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_abea6570b95fdfa102511ccd1fcb30685"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#abea6570b95fdfa102511ccd1fcb30685">statevec_hadamardDistributed</a></div><div class="ttdeci">void statevec_hadamardDistributed(Qureg qureg, ComplexArray stateVecUp, ComplexArray stateVecLo, ComplexArray stateVecOut, int updateUpper)</div><div class="ttdoc">Rotate a single qubit by {{1,1},{1,-1}}/sqrt2.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02932">QuEST_cpu.c:2932</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a430d98e35f1eae7f0815ac539057cf67"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a430d98e35f1eae7f0815ac539057cf67">statevec_findProbabilityOfZeroDistributed</a></div><div class="ttdeci">qreal statevec_findProbabilityOfZeroDistributed(Qureg qureg)</div><div class="ttdoc">Measure the probability of a specified qubit being in the zero state across all amplitudes held in th...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03262">QuEST_cpu.c:3262</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_afa58cf7cb98a25ab33621120c5c330d0"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#afa58cf7cb98a25ab33621120c5c330d0">densmatr_applyDiagonalOpLocal</a></div><div class="ttdeci">void densmatr_applyDiagonalOpLocal(Qureg qureg, DiagonalOp op)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03696">QuEST_cpu.c:3696</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_aafc398f8f479fcc066a2dea700235635"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#aafc398f8f479fcc066a2dea700235635">statevec_unitaryLocal</a></div><div class="ttdeci">void statevec_unitaryLocal(Qureg qureg, int targetQubit, ComplexMatrix2 u)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01932">QuEST_cpu.c:1932</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a7ea68e9132ed9db9c242353a33dba2f0"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a7ea68e9132ed9db9c242353a33dba2f0">statevec_collapseToOutcomeDistributedSetZero</a></div><div class="ttdeci">void statevec_collapseToOutcomeDistributedSetZero(Qureg qureg)</div><div class="ttdoc">Set all amplitudes in one chunk to 0.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03501">QuEST_cpu.c:3501</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a7772f97cb4d92a9825bf3b7c82c3230c"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a7772f97cb4d92a9825bf3b7c82c3230c">densmatr_calcFidelityLocal</a></div><div class="ttdeci">qreal densmatr_calcFidelityLocal(Qureg qureg, Qureg pureState)</div><div class="ttdoc">computes a few dens-columns-worth of (vec^*T) dens * vec</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00990">QuEST_cpu.c:990</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ab124a3a9956046bf9c0e1e3ae9171f42"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ab124a3a9956046bf9c0e1e3ae9171f42">densmatr_mixDampingLocal</a></div><div class="ttdeci">void densmatr_mixDampingLocal(Qureg qureg, int targetQubit, qreal damping)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00174">QuEST_cpu.c:174</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ad09bb76ad67581b03ab176832cca37cf"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ad09bb76ad67581b03ab176832cca37cf">statevec_collapseToKnownProbOutcomeDistributedRenorm</a></div><div class="ttdeci">void statevec_collapseToKnownProbOutcomeDistributedRenorm(Qureg qureg, int measureQubit, qreal totalProbability)</div><div class="ttdoc">Renormalise parts of the state vector where measureQubit=0 or 1, based on the total probability of th...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03462">QuEST_cpu.c:3462</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a88670d0e7cebe33f61c1dd98daa338b3"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a88670d0e7cebe33f61c1dd98daa338b3">densmatr_mixDepolarisingDistributed</a></div><div class="ttdeci">void densmatr_mixDepolarisingDistributed(Qureg qureg, int targetQubit, qreal depolLevel)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00224">QuEST_cpu.c:224</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a8bea931504c90d9bd97e74645667804e"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a8bea931504c90d9bd97e74645667804e">densmatr_findProbabilityOfZeroLocal</a></div><div class="ttdeci">qreal densmatr_findProbabilityOfZeroLocal(Qureg qureg, int measureQubit)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03151">QuEST_cpu.c:3151</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a57368529b2a7e76fec423cbfe9980b22"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a57368529b2a7e76fec423cbfe9980b22">statevec_controlledUnitaryDistributed</a></div><div class="ttdeci">void statevec_controlledUnitaryDistributed(Qureg qureg, int controlQubit, Complex rot1, Complex rot2, ComplexArray stateVecUp, ComplexArray stateVecLo, ComplexArray stateVecOut)</div><div class="ttdoc">Rotate a single qubit in the state vector of probability amplitudes, given two complex numbers alpha ...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02381">QuEST_cpu.c:2381</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a86dbcc3db99294add9964741e19fbdab"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a86dbcc3db99294add9964741e19fbdab">statevec_hadamardLocal</a></div><div class="ttdeci">void statevec_hadamardLocal(Qureg qureg, int targetQubit)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02872">QuEST_cpu.c:2872</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_aeb4453a2e609e5359d2995bccf6663ca"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#aeb4453a2e609e5359d2995bccf6663ca">densmatr_calcExpecDiagonalOpLocal</a></div><div class="ttdeci">Complex densmatr_calcExpecDiagonalOpLocal(Qureg qureg, DiagonalOp op)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03781">QuEST_cpu.c:3781</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ab58fe4be895283c2c4eb86ec9af5682e"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ab58fe4be895283c2c4eb86ec9af5682e">statevec_multiControlledUnitaryDistributed</a></div><div class="ttdeci">void statevec_multiControlledUnitaryDistributed(Qureg qureg, int targetQubit, long long int ctrlQubitsMask, long long int ctrlFlipMask, Complex rot1, Complex rot2, ComplexArray stateVecUp, ComplexArray stateVecLo, ComplexArray stateVecOut)</div><div class="ttdoc">Apply a unitary operation to a single qubit in the state vector of probability amplitudes,...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02447">QuEST_cpu.c:2447</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a0f562af6cb665a8a7a3f80e9449734d5"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a0f562af6cb665a8a7a3f80e9449734d5">statevec_pauliYDistributed</a></div><div class="ttdeci">void statevec_pauliYDistributed(Qureg qureg, ComplexArray stateVecIn, ComplexArray stateVecOut, int updateUpper, int conjFac)</div><div class="ttdoc">Rotate a single qubit by +-{{0,-i},{i,0}.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02739">QuEST_cpu.c:2739</a></div></div>
<div class="ttc" id="astructDiagonalOp_html"><div class="ttname"><a href="structDiagonalOp.html">DiagonalOp</a></div><div class="ttdoc">Represents a diagonal complex operator on the full Hilbert state of a Qureg.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00178">QuEST.h:178</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a3510f01d4d15dcc545564eb84c668cad"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a3510f01d4d15dcc545564eb84c668cad">densmatr_mixTwoQubitDepolarisingLocal</a></div><div class="ttdeci">void densmatr_mixTwoQubitDepolarisingLocal(Qureg qureg, int qubit1, int qubit2, qreal delta, qreal gamma)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00387">QuEST_cpu.c:387</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a16ccb485bcffb328bbd5b2af6977cead"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a16ccb485bcffb328bbd5b2af6977cead">statevec_calcExpecDiagonalOpLocal</a></div><div class="ttdeci">Complex statevec_calcExpecDiagonalOpLocal(Qureg qureg, DiagonalOp op)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03738">QuEST_cpu.c:3738</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ab19f28e68330da68ea3caa2bdef32da9"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ab19f28e68330da68ea3caa2bdef32da9">statevec_multiControlledUnitaryLocal</a></div><div class="ttdeci">void statevec_multiControlledUnitaryLocal(Qureg qureg, int targetQubit, long long int ctrlQubitsMask, long long int ctrlFlipMask, ComplexMatrix2 u)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02173">QuEST_cpu.c:2173</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_acabdfbd3184d3ab3bded61e24142b800"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#acabdfbd3184d3ab3bded61e24142b800">densmatr_mixTwoQubitDepolarisingQ1LocalQ2DistributedPart3</a></div><div class="ttdeci">void densmatr_mixTwoQubitDepolarisingQ1LocalQ2DistributedPart3(Qureg qureg, int targetQubit, int qubit2, qreal delta, qreal gamma)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00632">QuEST_cpu.c:632</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_aa987d1e0ba97da2ca540194356dd62de"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#aa987d1e0ba97da2ca540194356dd62de">statevec_pauliXLocal</a></div><div class="ttdeci">void statevec_pauliXLocal(Qureg qureg, int targetQubit)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02498">QuEST_cpu.c:2498</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a08392b1b27d10e3b8a8648a5afeaa629"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a08392b1b27d10e3b8a8648a5afeaa629">densmatr_calcInnerProductLocal</a></div><div class="ttdeci">qreal densmatr_calcInnerProductLocal(Qureg a, Qureg b)</div><div class="ttdoc">computes Tr(conjTrans(a) b) = sum of (a_ij^* b_ij)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00958">QuEST_cpu.c:958</a></div></div>
<div class="ttc" id="astructQureg_html"><div class="ttname"><a href="structQureg.html">Qureg</a></div><div class="ttdoc">Represents a system of qubits.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00203">QuEST.h:203</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_aa183d46d750769c42ff07ae1aaedc105"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#aa183d46d750769c42ff07ae1aaedc105">insertZeroBit</a></div><div class="ttdeci">static long long int insertZeroBit(const long long int number, const int index)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu__internal_8h_source.html#l00042">QuEST_cpu_internal.h:42</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_af8236a00389137b5eff986a40577eaf3"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#af8236a00389137b5eff986a40577eaf3">statevec_multiControlledTwoQubitUnitaryLocal</a></div><div class="ttdeci">void statevec_multiControlledTwoQubitUnitaryLocal(Qureg qureg, long long int ctrlMask, int q1, int q2, ComplexMatrix4 u)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01747">QuEST_cpu.c:1747</a></div></div>
<div class="ttc" id="aQuEST__precision_8h_html"><div class="ttname"><a href="QuEST__precision_8h.html">QuEST_precision.h</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a45b0916c3e121837f214b64f7424e479"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a45b0916c3e121837f214b64f7424e479">statevec_pauliYLocal</a></div><div class="ttdeci">void statevec_pauliYLocal(Qureg qureg, int targetQubit, int conjFac)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02682">QuEST_cpu.c:2682</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a0e4eb651e7cb309bcd664b89ac9a2242"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a0e4eb651e7cb309bcd664b89ac9a2242">isOddParity</a></div><div class="ttdeci">static int isOddParity(const long long int number, const int qb1, const int qb2)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu__internal_8h_source.html#l00038">QuEST_cpu_internal.h:38</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ab5b51a28caa8792a3f0c637409a694b0"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ab5b51a28caa8792a3f0c637409a694b0">statevec_swapQubitAmpsLocal</a></div><div class="ttdeci">void statevec_swapQubitAmpsLocal(Qureg qureg, int qb1, int qb2)</div><div class="ttdoc">It is ensured that all amplitudes needing to be swapped are on this node.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03536">QuEST_cpu.c:3536</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a5ddfdb22e4704b680d67d08d9e80835b"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a5ddfdb22e4704b680d67d08d9e80835b">statevec_compactUnitaryLocal</a></div><div class="ttdeci">void statevec_compactUnitaryLocal(Qureg qureg, int targetQubit, Complex alpha, Complex beta)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01688">QuEST_cpu.c:1688</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a071baf8b6951d2a7d6529394b6f39364"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a071baf8b6951d2a7d6529394b6f39364">statevec_controlledCompactUnitaryDistributed</a></div><div class="ttdeci">void statevec_controlledCompactUnitaryDistributed(Qureg qureg, int controlQubit, Complex rot1, Complex rot2, ComplexArray stateVecUp, ComplexArray stateVecLo, ComplexArray stateVecOut)</div><div class="ttdoc">Rotate a single qubit in the state vector of probability amplitudes, given two complex numbers alpha ...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02319">QuEST_cpu.c:2319</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ae90f82418e0aa67218d733dbbc681998"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ae90f82418e0aa67218d733dbbc681998">densmatr_mixTwoQubitDepolarisingLocalPart1</a></div><div class="ttdeci">void densmatr_mixTwoQubitDepolarisingLocalPart1(Qureg qureg, int qubit1, int qubit2, qreal delta)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l00488">QuEST_cpu.c:488</a></div></div>
<div class="ttc" id="astructComplex_html"><div class="ttname"><a href="structComplex.html">Complex</a></div><div class="ttdoc">Represents one complex number.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00103">QuEST.h:103</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a215e2d6f88dbecc0b408b3573b5e144f"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a215e2d6f88dbecc0b408b3573b5e144f">statevec_controlledCompactUnitaryLocal</a></div><div class="ttdeci">void statevec_controlledCompactUnitaryLocal(Qureg qureg, int controlQubit, int targetQubit, Complex alpha, Complex beta)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02101">QuEST_cpu.c:2101</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ae94d012c3da6c84599e99f6afea81f5f"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ae94d012c3da6c84599e99f6afea81f5f">maskContainsBit</a></div><div class="ttdeci">static int maskContainsBit(const long long int mask, const int bitInd)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu__internal_8h_source.html#l00034">QuEST_cpu_internal.h:34</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a464efbd1d7ca5a7b25c83ada001955c2"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a464efbd1d7ca5a7b25c83ada001955c2">statevec_pauliXDistributed</a></div><div class="ttdeci">void statevec_pauliXDistributed(Qureg qureg, ComplexArray stateVecIn, ComplexArray stateVecOut)</div><div class="ttdoc">Rotate a single qubit by {{0,1},{1,0}.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02556">QuEST_cpu.c:2556</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a0a7a35628b1c1eb47336deb9afda5b68"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a0a7a35628b1c1eb47336deb9afda5b68">statevec_compactUnitaryDistributed</a></div><div class="ttdeci">void statevec_compactUnitaryDistributed(Qureg qureg, Complex rot1, Complex rot2, ComplexArray stateVecUp, ComplexArray stateVecLo, ComplexArray stateVecOut)</div><div class="ttdoc">Rotate a single qubit in the state vector of probability amplitudes, given two complex numbers alpha ...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02001">QuEST_cpu.c:2001</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a8909226b5f0589d82b34af7f6bf2a339"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a8909226b5f0589d82b34af7f6bf2a339">insertTwoZeroBits</a></div><div class="ttdeci">static long long int insertTwoZeroBits(const long long int number, const int bit1, const int bit2)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu__internal_8h_source.html#l00049">QuEST_cpu_internal.h:49</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_a8535bc15c2ff249ddddb3fde6eff1490"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#a8535bc15c2ff249ddddb3fde6eff1490">statevec_findProbabilityOfZeroLocal</a></div><div class="ttdeci">qreal statevec_findProbabilityOfZeroLocal(Qureg qureg, int measureQubit)</div><div class="ttdoc">Measure the total probability of a specified qubit being in the zero state across all amplitudes in t...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l03206">QuEST_cpu.c:3206</a></div></div>
<div class="ttc" id="aQuEST__cpu__internal_8h_html_ace1482ef82b83e7f926634a67b322fc4"><div class="ttname"><a href="QuEST__cpu__internal_8h.html#ace1482ef82b83e7f926634a67b322fc4">statevec_controlledNotLocal</a></div><div class="ttdeci">void statevec_controlledNotLocal(Qureg qureg, int controlQubit, int targetQubit)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l02584">QuEST_cpu.c:2584</a></div></div>
<div class="ttc" id="astructComplexMatrix2_html"><div class="ttname"><a href="structComplexMatrix2.html">ComplexMatrix2</a></div><div class="ttdoc">Represents a 2x2 matrix of complex numbers.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00114">QuEST.h:114</a></div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
</body>
        <script type="text/javascript" src="boot.js"></script>
</html>
